<%@ page import="com.shop.servlet.impl.ShopCatServletImpl" %>
<%@ page import="com.shop.entity.User" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	ShopCatServletImpl servlet = new ShopCatServletImpl();
	User user = (User) session.getAttribute("user");
	if (user!=null){
		Integer id = user.getId();
		Integer shopNum = servlet.getCountByUid(id);
		request.setAttribute("shopNum",shopNum);
	}
%>
	<div class="hmtop">
			<!--顶部导航条 -->
			<div class="am-container header">
				<ul class="message-l">
					<div class="topMessage">
						<div class="menu-hd">
							<c:if test="${user!=null}">
								<a href="javascript:void(0)" target="_top" class="h">${user.username},欢迎您！</a>
							</c:if>
							<c:if test="${user==null}">
								<a href="login.jsp" target="_top" class="h">亲，请登录！</a>
								<a href="register.jsp" target="_top">免费注册</a>
							</c:if>
						</div>
					</div>
				</ul>
				<ul class="message-r">
					<div class="topMessage home">
						<div class="menu-hd"><a href="home.jsp" target="_top" class="h">商城首页</a></div>
					</div>
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a href="" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd" href="/shopcat/check" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h" style="color: red">${shopNum}</strong></a></div>
					</div>
						<div class="topMessage my-shangcheng">
						<div class="menu-hd"><a href="collection.jsp" target="_top"><i class="am-icon-heart am-icon-fw"></i><span><a href="">注销帐户</a></span></a></div>
				</ul>
				</div>

				<!--悬浮搜索框-->

				<div class="nav white">
					<div class="logo"><img src="" /></div>
					<div class="logoBig">
						<li><img src="images/indexlogo.png" /></li>
					</div>

					<div class="search-bar pr">
						<a name="index_none_header_sysc" href="#"></a>
						<form>
							<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
							<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
						</form>
					</div>
				</div>

				<div class="clear"></div>
			</div>